import request from '@/utils/request'

// 查询绿化碳汇列表
export function listSink(query) {
  return request({
    url: '/greenCarbon/sink/list',
    method: 'get',
    params: query
  })
}


// 查询绿化对应参数
export function getGreenCarbonSinkParameters(query) {
  return request({
    url: '/greenCarbon/sink/getGreenCarbonSinkParameters',
    method: 'get',
    params: query
  })
}


// 查询绿化碳汇详细
export function getSink(id) {
  return request({
    url: '/greenCarbon/sink/' + id,
    method: 'get'
  })
}

// 新增绿化碳汇
export function addSink(data) {
  return request({
    url: '/greenCarbon/sink',
    method: 'post',
    data: data
  })
}

// 修改绿化碳汇
export function updateSink(data) {
  return request({
    url: '/greenCarbon/sink',
    method: 'put',
    data: data
  })
}

// 删除绿化碳汇
export function delSink(id) {
  return request({
    url: '/greenCarbon/sink/' + id,
    method: 'delete'
  })
}

// 导出绿化碳汇
export function exportSink(query) {
  return request({
    url: '/greenCarbon/sink/export',
    method: 'get',
    params: query
  })
}

// 保存上传数据
export function changeData(data) {
  return request({
    url: '/greenCarbon/sink/changeData',
    method: 'post',
    data: data
  })
}
